<?php
/**
 * Created by lni_wang.
 * Product: PhpStorm
 * Date: 2017/4/16 15:45
 * File: mysql.php
 */
define('DB_USER_00', 'root');
define('DB_PASS_00', '818283');
define('DB_PORT', '3306');
define('DB_DRIVER_00', 'mysqli');
define('DB_PREFIX_00', ''); // 表前缀
define('DATABASE_00', 'wangyuanlei.com');
$config['mysql'] = [
    'db_maps'    => [
        1   => [ #设置数据库主机索引值 不能用0 最小值为1
             'hostname'     => DATABASE_00,
             'username'     => DB_USER_00,
             'password'     => DB_PASS_00,
             'database'     => 'crawler',
             'dbdriver'     => DB_DRIVER_00,
             'dbprefix'     => DB_PREFIX_00,
             'pconnect'     => false,
             'db_debug'     => (ENVIRONMENT !== 'production'),
             'cache_on'     => false,
             'cachedir'     => '',
             'char_set'     => 'utf8',
             'dbcollat'     => 'utf8_general_ci',
             'swap_pre'     => '',
             'encrypt'      => false,
             'compress'     => false,
             'stricton'     => false,
             'failover'     => [], #故障转移数据库, 当数据库发生不能连接时候, 自动切换数据库操作, 可设置多个
             'save_queries' => true,
             'dsn'          => '',
        ],
    ],
    'tables' => [
        'access_token' => [
            'name'          => 'access_token',
            'map'           => 1,
        ],
        'certificate' => [
            'name'          => 'certificate',
            'map'           => 1,
        ],
        'messages' => [
            'name'          => 'messages',
            'map'           => 1,
        ],
        'users' => [
            'name'          => 'users',
            'map'           => 1,
        ],
        'user_keys' => [
            'name'          => 'user_keys',
            'map'           => 1,
        ],
        'user_links' => [
            'name'          => 'user_links',
            'map'           => 1,
        ]
    ]
];
